package com.l.web.service.system.webnode;

import org.l.qiao.Cluster;
import org.l.qiao.search.Sort;
import com.l.web.service.ServiceSupport;
import org.apache.log4j.Logger;

import java.util.List;

public class WebNodeListService extends ServiceSupport {

    private static final Logger LOGGER = Logger.getLogger(WebNodeListService.class);
    private WebNodeDAO webNodeDAO;

    public void setWebNodeDAO(WebNodeDAO webNodeDAO) {
        this.webNodeDAO = webNodeDAO;
    }

    public String execute() {
        Sort sort = new Sort();
        sort.asc(WebNode.INDEX);
        List<Cluster> webNodes = webNodeDAO.find(null, null, sort);
        context.put("webNodes", webNodes);
        return LIST;
    }
}
